package logic.pathelements;

import java.util.Collection;

import logic.connectors.Connector;

/**
 * 
 * @author Alex.Shilov92
 *
 */
public class Hub extends PassiveElement{
	

	private int Cost;
	private int TimeDelay;
	private String Infohub;
	private Integer Id;
	
	/**	
	 * @author alex.shilov92
	 * Constructor. Execute parent constructor of {@link PassiveElement}
	 * @param id				element ID
	 * @param connectorsCount	quantity of the connectors
	 * @param Cost 				Cost
	 * @param TimeDelay			time delay for transmission data
	 */
	public Hub(Integer id, int connectorsCount, int Cost, int TimeDelay) {
		super(id, connectorsCount);
		this.Cost = Cost;
		this.Id = id;
		this.TimeDelay = TimeDelay;
		Infohub = "Cost = " + Cost + ", TimeDelay =" + TimeDelay + ", ID = " + id + ", Number Connector = " + connectorsCount;
	}
	
	/**
	 * this function return collection e;ement from perent class
	 * @return Collection element from parent class
	 */
	public Collection<Connector> getConnector()
	{
		return connectors;
	}
	
    @Override
    /**
     * values nearly real cost
     * @return some integer values nearly real cost
     */
    public double getCosts() {
            return this.Cost;
    }

    
    @Override
    public Integer getId() {
            return Id;
    }
    
    
    @Override
    public String getInfo() {
            return this.Infohub;
    }
    
    @Override
    /**
     * Time delay in millisecond
     * @return integer value , determined time delay in millisecond
     */
    public double getTimeDelay() {
            return this.TimeDelay;
    }
		
    @Override
    public String toString() {
    	// TODO Auto-generated method stub
    	return super.toString()+ " " + this.Infohub;
    }
}


